Replication files for the paper:
  
"Empirical Bayes Methods for Dynamic Factor Models," 
The Review of Economics and Statistics
Siem Jan Koopman, VU University Amsterdam and Tinbergen Institute
Geert Mesters, Universitat Pompeu Fabra, Barcelona GSE
 
Programs are also available at: http://www.geertmesters.nl
  
 
The replciation files are divided in two parts. 

1. The folder replicate simulations enables the researchers to replicate Table 1 in the paper. 
   The codes are separated for the different panels in the table. 
   The additional file DFM_MLE_est.ox is called from all other files. 
   It performs the maximum likelihood estimation using the Kalman filter. 

2. The folder replicate application is for replicating the empirical study. 
   It contains the dataset from Stock and Watson (2012) transformed according to their guidelines.
   


All codes have a similar structure and we explain the code MainSimulations_replicates_panels_i_ii_iii.ox
in details. The code has three functions.
1. the main function which organizes the simulation study 
2. data generating function which generates the panel using different inputs
3. the EM-type-algorithm this is core contribution of the paper as it implements Theorem 2.

Some comments:
- each line of code is explained by a comment 
- the beginning of the main functions can be modified for alternative simulation experiments
- additional implementation are available from www.geertmesters.nl

Software:
All codes are writtem for Ox version 7.1 and make use of the SsfPack package 

 
